package com.kgc.ssm.mapper;

import com.kgc.ssm.entity.Quote;
import com.kgc.ssm.entity.QuoteExample;
import java.util.List;
import java.util.Map;

import com.kgc.ssm.entity.dto.QuotationResult;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;

public interface QuoteMapper {
    long countByExample(QuoteExample example);

    int deleteByExample(QuoteExample example);

    int deleteByPrimaryKey(Long id);

    int insert(Quote row);

    int insertSelective(Quote row);

    List<Quote> selectByExampleWithRowbounds(QuoteExample example, RowBounds rowBounds);

    List<Quote> selectByExample(QuoteExample example);

    Quote selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("row") Quote row, @Param("example") QuoteExample example);

    int updateByExample(@Param("row") Quote row, @Param("example") QuoteExample example);

    int updateByPrimaryKeySelective(Quote row);

    int updateByPrimaryKey(Quote row);
    List<QuotationResult>seleQuotationByMaterCode(@Param("list") List<String> materialCodes);

    @Select("select * from QUOTE q,QUOTE_DETAIL qd where q.id = qd.quote_id and q.id = #{id}")
    List<Map<String,Object>> selectAllQD(Integer id);

}